home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Gfx / Edit / ImageEngineer / ARexx / Vignette.rexx < prev    next >
OS/2 REXX Batch file  |  1995-03-19  |  1KB  |  56 lines

  1. /**************************************************/
  2. /* Image Engineer script                          */
  3. /* by Simon Edwards                               */
  4. /* Applies a blurred Vignette effect to an image. */
  5. /**************************************************/
  6.  
  7. Options results
  8. signal on error            /* Setup a place for errors to go */
  9.  
  10. address 'IMAGEENGINEER'
  11. IE_To_Front
  12. 'REQUEST "This applies a Blurred Vigette'||D2C(10)||'effect to an image." "Let''s Go!"'
  13.  
  14. 'GET_FILE "Select an image" "This One"'
  15. filename=result
  16. if filename="" then exit
  17. TYPE 24BIT
  18. 'OPEN "'||filename||'"'
  19. source=result
  20.  
  21. LOWPASS source 5 5
  22. blurredimage=result
  23. PROJECT_INFO source Width
  24. width=result
  25. PROJECT_INFO source Height
  26. height=result
  27.  
  28. TYPE 8BIT
  29. 'OPEN IE:alpha/Spherical.alpha'
  30. alphachannel=result
  31. SCALE alphachannel width height BEST
  32. newalpha=result
  33. CLOSE alphachannel
  34.  
  35. MARK source PRIMARY
  36. MARK blurredimage SECONDARY
  37. MARK newalpha ALPHA
  38. COMPOSITE 0 0 ALPHA
  39.  
  40. CLOSE newalpha
  41. CLOSE blurredimage
  42. CLOSE source
  43.  
  44. 'REQUEST "All Done." "Cool."'
  45. exit
  46.  
  47. /*******************************************************************/
  48. /* This is where control goes when an error code is returned by IE */
  49. /* It puts up a message saying what happened and on which line     */
  50. /*******************************************************************/
  51. error:
  52. IE_to_front
  53. LAST_ERROR
  54. 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!'
  55. exit
  56.